#pragma once
#include "tcpclient.hpp"

#include <memory>
using namespace sxj;
static void  Usage(std::string proc)
{
    std::cout<<"\nUsage:\n\t"<<proc<<"serverip  serverport\n\n";
}

// tcpclient serverip serverport
int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(-1);
    }
    std::string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]); 
    std::unique_ptr<sxj::tcpclient> tcli(new sxj::tcpclient(serverip,serverport));
    tcli->initclient();
    tcli->start();
    return 0;
}